package com.lxq.LeetCode.maxDepth;

import com.lxq.DataStructure.TreeNode;

public class Solution {
    public static void main(String[] args) {

    }

    public static int maxDepth(TreeNode root) {

        return root == null ? 0 : Math.max(maxDepth(root.left), maxDepth(root.right)) + 1;
    }
}
